Fix a small leak in ostree_repo_remote_list_collection_refs
authorMatthias Clasen <mclasen@redhat.com>
Sat, 15 Dec 2018 20:19:46 +0000 (15:19 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 20 Dec 2018 18:10:16 +0000 (18:10 +0000)
g_variant_iter_loop would free the value for us,
but not if we're returning from the middle of the
loop body.

Closes: #1788
Approved by: cgwalters

src/libostree/ostree-repo-refs.c

index 1bbe39016d01cbed8d558155ead69f7725a51174..1267b24050f44b2f2b51e28515decb28d76237df 100644 (file)
@@ -1002,7 +1002,7 @@ ostree_repo_remote_list_collection_refs (OstreeRepo    *self,
     summary_collection_map = NULL;
 
   while (summary_collection_map != NULL &&
-         g_variant_iter_loop (summary_collection_map, "{s@a(s(taya{sv}))}", &summary_collection_id, &summary_refs))
+         g_variant_iter_loop (summary_collection_map, "{&s@a(s(taya{sv}))}", &summary_collection_id, &summary_refs))
     {
       if (!remote_list_collection_refs_process_refs (self, remote_name,
                                                      summary_collection_id, summary_refs,